import request from '@/utils/request'

// 查询公共消息模版信息列表
export function listPublicMessage(query) {
  return request({
    url: '/enterprise/messageCenter/publicMessage/list',
    method: 'get',
    params: query
  })
}

// 查询公共消息模版信息详细
export function getPublicMessage(publicMessageId) {
  return request({
    url: '/enterprise/messageCenter/publicMessage/' + publicMessageId,
    method: 'get'
  })
}

// 新增公共消息模版信息
export function addPublicMessage(data) {
  return request({
    url: '/enterprise/messageCenter/publicMessage',
    method: 'post',
    data: data
  })
}

// 修改公共消息模版信息
export function updatePublicMessage(data) {
  return request({
    url: '/enterprise/messageCenter/publicMessage',
    method: 'put',
    data: data
  })
}

// 删除公共消息模版信息
export function delPublicMessage(publicMessageId) {
  return request({
    url: '/enterprise/messageCenter/publicMessage/' + publicMessageId,
    method: 'delete'
  })
}
